package com.ruoyi.constant;

/**
 * 任务来源
 *
 * @author liuliya
 */
public enum RwlyEnum {

    JCRW(1, "监测任务"),
    CGRW(2, "常规任务"),
    LSRW(3, "临时任务");


    private Integer code;
    private String desc;

    RwlyEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(Integer code) {
        for (RwlyEnum value : RwlyEnum.values()) {
            if (value.getCode().equals(code)) {
                return value.getDesc();
            }
        }
        return "";
    }
}
